package entity

import "time"

type Dept struct {
	DeptId     int64     `xorm:"pk autoincr bigint(20)" form:"deptId" json:"deptId"`
	ParentId   int64     `xorm:"bigint(20)" form:"parentId" json:"parentId"`
	Ancestors  string    `xorm:"varchar(50)" form:"ancestors" json:"ancestors"`
	DeptName   string    `xorm:"varchar(30)" form:"deptName" json:"deptName"`
	OrderNum   int       `xorm:"int(4)" form:"orderNum" json:"orderNum"`
	Leader     string    `xorm:"varchar(20)" form:"leader" json:"leader"`
	Phone      string    `xorm:"varchar(11)" form:"phone" json:"phone"`
	Email      string    `xorm:"varchar(50)" form:"email" json:"email"`
	Status     string    `xorm:"char(1)" form:"status" json:"status"`
	DelFlag    string    `xorm:"char(1)" form:"delFlag" json:"delFlag"`
	CreateBy   string    `xorm:"varchar(64)" form:"createBy" json:"createBy"`
	CreateTime time.Time `xorm:"datetime" form:"createTime" json:"createTime"`
	UpdateBy   string    `xorm:"varchar(64)" form:"updateBy" json:"updateBy"`
	UpdateTime time.Time `xorm:"datetime" form:"updateTime" json:"updateTime"`
	Children   []Dept    `xorm:"-"json:"children,omitempty"`
}

type DeptVo struct {
	Id       int64    `json:"id"`
	Label    string   `json:"label"`
	Children []DeptVo `json:"children,omitempty"`
}
